package XML.g1;

import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;

public class PartyHandler extends DefaultHandler{
	
	static int elementCount = 0;
	static int attributeCount = 0;

	@Override
	public void startDocument() throws SAXException {
		System.out.println("Document starts...");
	}
	
	@Override
	public void endDocument() throws SAXException {
		System.out.println("Document ends...");
	}
	
	@Override
	public void startElement(String uri, String localName, String qName,
			Attributes attributes) throws SAXException {
		elementCount++;
		attributeCount += attributes.getLength();
	}
}
